package com.dao;

import com.dto.ActivityApplyDetailDTO;
import com.dto.ActivityDTO;
import com.dto.BookDTO;
import com.vo.ActivityApplyDetailVO;
import com.vo.ActivityVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author linyukun
 * @date 2022/10/8 15:58
 */
@Mapper
@Repository
public interface ActivityDao {
    Integer addActivity(@Param("dto") ActivityDTO dto);

    List<ActivityVO> getActivityList(@Param("dto")ActivityDTO dto);

    Integer delActivity(@Param("dto") ActivityDTO dto);

    Integer updateActivity(@Param("dto")ActivityDTO dto);

    ActivityVO getActivityById(@Param("id")Integer id);

    Integer publishActivity(@Param("id")Integer id);

    List<ActivityVO> getAllNoFinishActivitys();

    void updateActivityState(@Param("id") Integer id, @Param("state")int state);

    Integer applyActivity(@Param("dto")ActivityApplyDetailDTO dto);

    List<ActivityApplyDetailVO> getActivityApplyDetailList(@Param("dto")ActivityApplyDetailDTO dto);

    Integer delActivityApplyDetailById(@Param("dto")ActivityApplyDetailDTO dto);
}
